package com.example.tijianbackend.controller;

import com.example.tijianbackend.dto.CalendarRequestDto;
import com.example.tijianbackend.dto.CalendarResponseDto;
import com.example.tijianbackend.result.Result;
import com.example.tijianbackend.service.CalendarService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author: bong~
 * @description: TODO
 * @date: 2024/6/17 15:27
 * @version: 1.0
 */
@RestController
@Slf4j
@RequestMapping("/calendar")
@Api(tags ="CalendarController")
@CrossOrigin("*")
public class CalendarController {

    @Autowired
    private CalendarService calendarService;

    @ApiOperation("获取万年历的预约表")
    @PostMapping("/listAppointmentCalendar")
    public Result listAppointmentCalendar(@RequestBody CalendarRequestDto dto){

        List<CalendarResponseDto> list=calendarService.listAppointmentCalendar(dto);

        return Result.success(list);

    }
}
